package com.tool.minio.mapper;

import com.tool.minio.entity.Media;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 酒徒
 * @Version 1.0
 * @data 2025/6/19 15:18
 */
@Mapper
public interface MediaMapper {

    @Select("select id, url from media where type = #{type}")
    List<Media> findAllMedia(String type);

    @Insert("insert into media(url, type) values(#{url}, #{type})")
    void save(Media media);
}
